package com.oauth2demo.utils;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <h3>oauth2Demo</h3>
 * <p>网页返回工具类</p>
 *
 * @author gdw
 * @since 2024-07-04 11:23:44
 */
public class ServletUtils {
    public static void renderString(HttpServletResponse response, String string) {
        try {
            response.setContentType("application/json;charset=UTF-8");
            response.getWriter().write(string);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
